<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>Title</title>
  <style>
    table, th, td {
      border: 1px solid #ccc;
    }
    th
    {
      white-space: nowrap;
    }
  </style>
</head>
<body>
<table>
  <tr>
    <th>编号</th>
    <th>编码</th>
    <th>角色名称</th>
    <th>角色状态</th>
    <th>创建时间</th>
    <th>修改时间</th>
    <th>操作</th>
  </tr>
  <c:forEach items="${roles}" var="role" varStatus="status">
    <tr>
      <td>${status.index + 1}</td>
      <td>${role.roleCode}</td>
      <td>${role.roleName}</td>
      <td>${role.roleStatus==1?"启用":"停用"}</td>
      <td>${role.createTime}</td>
      <td>${role.updateTime}</td>
      <td>
        <a href="/role/roleMenu?roleCode=${role.roleCode}">分配权限</a>
        <a href="/role/setStatus?status=${role.roleStatus==1?0:1}&roleCode=${role.roleCode}">${role.roleStatus==1?"停用":"启用"}</a></td>
    </tr>
  </c:forEach>
</table>
</body>
</html>
